/*jadclipse*/// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) radix(10) lradix(10) 
// Source File Name:   LoggerGeneralConfig.java

package nc.bs.logging;

import nc.vo.logging.Util;

public class LoggerGeneralConfig
{

    public LoggerGeneralConfig()
    {
    }

    public static boolean isFormatAsXml()
    {
        return "xml".equals("text");
    }

    public static boolean isRunningInServer()
    {
        String s;
        if(a == null)
            if((s = System.getProperty("nc.run.side")) == null)
            {
                String as[] = {
                    "nc.bs.mw.start.NCStarter", "com.ibm.websphere.naming.WsnInitialContextFactory", "weblogic.jndi.WLInitialContextFactory"
                };
                ClassLoader classloader = Thread.currentThread().getContextClassLoader();
                int i = 0;
                do
                {
                    if(i >= as.length)
                        break;
                    try
                    {
                        classloader.loadClass(as[i]);
                        a = new Boolean(true);
                        System.setProperty("nc.run.side", "server");
                        break;
                    }
                    catch(Exception _ex)
                    {
                        i++;
                    }
                } while(true);
                if(a == null)
                {
                    a = new Boolean(false);
                    System.setProperty("nc.run.side", "client");
                }
            } else
            {
                a = new Boolean("server".equals(s));
                System.setProperty("nc.run.side", a.booleanValue() ? "server" : "client");
            }
        return a.booleanValue();
    }

    public static final String ANONY_MODULE = "anonymous";
    public static final String NCLOG_MODULE = "nclog";
    public static final String LINE_SEP = System.getProperty("line.separator");
    public static final String DEFAULT_LEVEL_PROPERTY = "nc.bs.logging.default.level";
    public static final String DEFAULT_PATTERN_PROPERTY = "nc.bs.logging.default.pattern";
    public static final String LOG_FORMAT_PROPERTY = "nc.bs.logging.format";
    public static final String TEXT_FORMAT = "text";
    public static final String XML_FORMAT = "xml";
    public static String DEFAULT_LEVEL = Util.getSystemProperty("nc.bs.logging.default.level", "DEBUG");
    public static String DEFAULT_PATTERN = Util.getSystemProperty("nc.bs.logging.default.pattern", "[%t] %d{yyyy/MM/dd HH:mm:ss} [%A] %p  - %m %n");
    public static String LOG_FORMAT = Util.getSystemProperty("nc.bs.logging.format", "xml");
    public static final Object flagObject = new Object();
    public static final String LOG_TYPE_PUB = "Pub";
    public static final String LOG_TYPE_MW = "Mw";
    public static final String LOG_TYPE_SQL = "SQL";
    public static final String MODULE_CONFIG_PROPERTY = "nc.bs.logging.loggerConfig";
    public static final String MODULE_CONFIG_DEFAULT = Util.getSystemProperty("nc.bs.logging.loggerConfig", "./ierp/bin/logger-config.properties");
    private static Boolean a;
    public static final String BEGIN_REMOVE_EXCEPTION_TRACE = "at javax.servlet.GenericServlet";
    public static final String BEGIN_REMOVE_EXCEPTION_TRACE1 = "at javax.servlet.http.HttpServlet";
    public static final String END_REMOVE_EXCEPTION_TRACE = "Caused by:";
    public static final boolean IGNORE_MW_TRACE = "true".equals(System.getProperty("nc.ignore_mw_trace", "true"));

}
